In Dreamweaver, you can open or import documents saved by Microsoft Word as HTML files, and then you can use the Clean Up Word HTML dialog box to remove the extraneous HTML code generated by Word. The code that Dreamweaver removes is primarily used by Word to format and display documents in Word and is not needed to display the HTML file. Retain a copy of your original Word (.doc) file as a backup, because you may not be able to reopen the HTML document in Word once you've applied the Clean Up Word HTML feature. The Clean Up Word HTML command is available for documents saved as HTML files by Word 97 or later.
To use the Clean Up Word HTML feature:
1 | In Microsoft Word, save your document as an HTML file. |
2 | Open the HTML document in Dreamweaver using either of the following methods: |
![]() |
Choose File > Import > Import Word HTML and select a file to open. |
Dreamweaver opens the file and then automatically opens the Clean Up Word HTML dialog box. | |
![]() |
Choose File > Open and select a file to open. |
An HTML Corrections log file is automatically generated. This is not part of the Clean Up Word HTML feature. Click Continue to exit the dialog box. Then, in Dreamweaver, choose Commands >Clean Up Word HTML. | |
3 | With either of these methods, there may be a slight delay while Dreamweaver attempts to determine which version of Word was used to save the file. If Dreamweaver is unable to determine this, select the correct version using the pop-up menu. |
4 | Choose which options the Clean Up Word HTML feature should use. The Basic tab displays the following options: |
![]() |
Remove all Word Specific Markup removes all Word-specific HTML, including XML from <html> tags, Word custom meta data and link tags in the head of the document, Word XML markup, conditional tags and their contents, and empty paragraphs and margins from styles. You have the option of selecting each of these options individually using the Detailed tab. |
![]() |
Clean up CSS removes all Word-specific CSS, including Inline CSS styles when possible (where the parent style has the same style properties), style attributes beginning with "mso," non-CSS style declarations, CSS style attributes from tables, and all unused style definitions from the head. This option can be further customized by clicking on the Detailed tab. |
![]() |
Clean up <font> Tags removes HTML tags, converting the default body text to size 2 HTML. |
![]() |
Fix Invalidly Nested Tags removes the font markup tags inserted by Word outside of the paragraph and heading (block level) tags. |
![]() |
Set Background Color allows you to enter a hex value to set the background color of your document. If you do not set a background color, your Word HTML document will have a gray background. The default hex value set by Dreamweaver is white. |
![]() |
Apply Source Formatting applies the source formatting options you specify in HTML Format preferences and Source Format.profile to the document. |
![]() |
Show Log on Completion displays an alert box with details about the changes made to the document as soon as the clean-up is finished. |
5 | Click OK. |
Depending on the size of your document and the number of options selected, it may take several seconds to complete the clean-up. The preferences you entered are automatically saved as the default Clean Up Word HTML settings. | |
![]() |